package com.hhkj.admin.conf.model.extend;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hhkj.admin.conf.common.validator.commission.ValidateCommissionRate;
import com.ruoyi.common.valid.VAdd;
import com.ruoyi.common.valid.VEdit;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommissionRate extends Rule {

    /** 本级返利百分比 */
    @NotNull(message = "本级返利百分比不能为空", groups = {VAdd.class, VEdit.class})
    private BigDecimal thisLevelRate;

    /** 上一级返利百分比 */
    @NotNull(message = "上一级返利百分比不能为空", groups = {VAdd.class, VEdit.class})
    private BigDecimal upOneLevelRate;

    /** 生效时间 */
//    @NotNull(message = "生效时间不能为空", groups = {VAdd.class, VEdit.class})
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveTime;

}
